home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / dom / nsIBrowserDOMWindow.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  145 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIBrowserDOMWindow.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIBrowserDOMWindow_h__
  6. #define __gen_nsIBrowserDOMWindow_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19. class nsIURI; /* forward declaration */
  20.  
  21.  
  22. /* starting interface:    nsIBrowserDOMWindow */
  23. #define NS_IBROWSERDOMWINDOW_IID_STR "af25c296-aaec-4f7f-8885-dd37a1cc0a13"
  24.  
  25. #define NS_IBROWSERDOMWINDOW_IID \
  26.   {0xaf25c296, 0xaaec, 0x4f7f, \
  27.     { 0x88, 0x85, 0xdd, 0x37, 0xa1, 0xcc, 0x0a, 0x13 }}
  28.  
  29. /**
  30.  * The C++ source has access to the browser script source through
  31.  * nsIBrowserWindow. It is intended to be attached to the chrome
  32.  * DOMWindow of a browser window. A DOMWindow that does not happen to
  33.  * be a browser chrome window will simply have no access to any such
  34.  * interface.
  35.  */
  36. class NS_NO_VTABLE nsIBrowserDOMWindow : public nsISupports {
  37.  public: 
  38.  
  39.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBROWSERDOMWINDOW_IID)
  40.  
  41.   /**
  42.    * values for openURI's aWhere parameter
  43.    */
  44.   enum { OPEN_DEFAULTWINDOW = 0 };
  45.  
  46.   enum { OPEN_CURRENTWINDOW = 1 };
  47.  
  48.   enum { OPEN_NEWWINDOW = 2 };
  49.  
  50.   enum { OPEN_NEWTAB = 3 };
  51.  
  52.   /**
  53.    * values for openURI's aContext parameter
  54.    */
  55.   enum { OPEN_EXTERNAL = 1 };
  56.  
  57.   enum { OPEN_NEW = 2 };
  58.  
  59.   /**
  60.    * Load a URI
  61.    * @param aURI the URI to open. null is allowed; it means about:blank.
  62.    * @param aWhere see possible values described above.
  63.    * @param aOpener window requesting the open (can be null).
  64.    * @param aContext the context in which the URI is being opened. This
  65.    *                 is used only when aWhere == OPEN_DEFAULTWINDOW.
  66.    * @return the window into which the URI was opened.
  67.   */
  68.   /* nsIDOMWindow openURI (in nsIURI aURI, in nsIDOMWindow aOpener, in short aWhere, in short aContext); */
  69.   NS_IMETHOD OpenURI(nsIURI *aURI, nsIDOMWindow *aOpener, PRInt16 aWhere, PRInt16 aContext, nsIDOMWindow **_retval) = 0;
  70.  
  71.   /**
  72.    * @param  aWindow the window to test.
  73.    * @return whether the window is the main content window for any
  74.    *         currently open tab.
  75.    */
  76.   /* boolean isTabContentWindow (in nsIDOMWindow aWindow); */
  77.   NS_IMETHOD IsTabContentWindow(nsIDOMWindow *aWindow, PRBool *_retval) = 0;
  78.  
  79. };
  80.  
  81. /* Use this macro when declaring classes that implement this interface. */
  82. #define NS_DECL_NSIBROWSERDOMWINDOW \
  83.   NS_IMETHOD OpenURI(nsIURI *aURI, nsIDOMWindow *aOpener, PRInt16 aWhere, PRInt16 aContext, nsIDOMWindow **_retval); \
  84.   NS_IMETHOD IsTabContentWindow(nsIDOMWindow *aWindow, PRBool *_retval); 
  85.  
  86. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  87. #define NS_FORWARD_NSIBROWSERDOMWINDOW(_to) \
  88.   NS_IMETHOD OpenURI(nsIURI *aURI, nsIDOMWindow *aOpener, PRInt16 aWhere, PRInt16 aContext, nsIDOMWindow **_retval) { return _to OpenURI(aURI, aOpener, aWhere, aContext, _retval); } \
  89.   NS_IMETHOD IsTabContentWindow(nsIDOMWindow *aWindow, PRBool *_retval) { return _to IsTabContentWindow(aWindow, _retval); } 
  90.  
  91. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  92. #define NS_FORWARD_SAFE_NSIBROWSERDOMWINDOW(_to) \
  93.   NS_IMETHOD OpenURI(nsIURI *aURI, nsIDOMWindow *aOpener, PRInt16 aWhere, PRInt16 aContext, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenURI(aURI, aOpener, aWhere, aContext, _retval); } \
  94.   NS_IMETHOD IsTabContentWindow(nsIDOMWindow *aWindow, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsTabContentWindow(aWindow, _retval); } 
  95.  
  96. #if 0
  97. /* Use the code below as a template for the implementation class for this interface. */
  98.  
  99. /* Header file */
  100. class nsBrowserDOMWindow : public nsIBrowserDOMWindow
  101. {
  102. public:
  103.   NS_DECL_ISUPPORTS
  104.   NS_DECL_NSIBROWSERDOMWINDOW
  105.  
  106.   nsBrowserDOMWindow();
  107.  
  108. private:
  109.   ~nsBrowserDOMWindow();
  110.  
  111. protected:
  112.   /* additional members */
  113. };
  114.  
  115. /* Implementation file */
  116. NS_IMPL_ISUPPORTS1(nsBrowserDOMWindow, nsIBrowserDOMWindow)
  117.  
  118. nsBrowserDOMWindow::nsBrowserDOMWindow()
  119. {
  120.   /* member initializers and constructor code */
  121. }
  122.  
  123. nsBrowserDOMWindow::~nsBrowserDOMWindow()
  124. {
  125.   /* destructor code */
  126. }
  127.  
  128. /* nsIDOMWindow openURI (in nsIURI aURI, in nsIDOMWindow aOpener, in short aWhere, in short aContext); */
  129. NS_IMETHODIMP nsBrowserDOMWindow::OpenURI(nsIURI *aURI, nsIDOMWindow *aOpener, PRInt16 aWhere, PRInt16 aContext, nsIDOMWindow **_retval)
  130. {
  131.     return NS_ERROR_NOT_IMPLEMENTED;
  132. }
  133.  
  134. /* boolean isTabContentWindow (in nsIDOMWindow aWindow); */
  135. NS_IMETHODIMP nsBrowserDOMWindow::IsTabContentWindow(nsIDOMWindow *aWindow, PRBool *_retval)
  136. {
  137.     return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139.  
  140. /* End of implementation class template. */
  141. #endif
  142.  
  143.  
  144. #endif /* __gen_nsIBrowserDOMWindow_h__ */
  145.